package com.cocolove2.library_cocodialog.animations.ZoomEnter;

import android.animation.ObjectAnimator;
import android.view.View;
import android.view.View.MeasureSpec;

import com.cocolove2.library_cocodialog.animations.BaseAnimatorEffects;

public class ZoomInBottomEnter extends BaseAnimatorEffects {
    public ZoomInBottomEnter() {
        mDuration = 600;
    }

    @Override
    public void setupAnimator(View view) {
        view.measure(MeasureSpec.UNSPECIFIED, MeasureSpec.UNSPECIFIED);
        int h = view.getMeasuredHeight();

        mAnimatorSet.playTogether(ObjectAnimator.ofFloat(view, "scaleX", 0.1f, 0.475f, 1),
                ObjectAnimator.ofFloat(view, "scaleY", 0.1f, 0.475f, 1),
                ObjectAnimator.ofFloat(view, "translationY", h, -60, 0), ObjectAnimator.ofFloat(view, "alpha", 0, 1, 1));
    }
}
